Class Move

java.lang.Object
edu.uky.ai.tic.state.Move

public class Move
extends java.lang.Object
Represents an individual move in a game of Tic Tac Toe.
Author:
Stephen G. Ware
  • Field Summary

    Fields 
    Modifier and Type Field Description
    int column
    The column in the grid in which the player will place his mark
    Player player
    The player making the move
    int row
    The row on the grid in which the player will place his mark
  • Constructor Summary

    Constructors 
    Constructor Description
    Move​(Player player, int row, int column)
    Constructs a move object.
  • Method Summary

    Modifier and Type Method Description
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • player

      public final Player player
      The player making the move
    • row

      public final int row
      The row on the grid in which the player will place his mark
    • column

      public final int column
      The column in the grid in which the player will place his mark
  • Constructor Details

    • Move

      public Move​(Player player, int row, int column)
      Constructs a move object.
      Parameters:
      player - the player making the move
      row - the row on the gird in which the player places his mark
      column - the column on the grid in which the player places his mark
  • Method Details

    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object